package com.ztgf.sys.models.service;

import com.baomidou.mybatisplus.service.IService;
import com.ztgf.common.constant.Result;
import com.ztgf.sys.models.bo.SysUserSaveBO;
import com.ztgf.sys.models.dto.SysUserDTO;
import com.ztgf.sys.models.vo.SysMenuVO;
import com.ztgf.sys.models.vo.SysUserVO;

import java.util.List;

/**
 * 系统用户表服务
 *
 * @author mxli
 * @Date 2020-05-27 10:13:02
 */
public interface ISysUserService extends IService<SysUserDTO> {

    void removeSession(String sysUserId,String sessionIdStr);

    void quietLogin();

    List<SysMenuVO> getMenuTreeList();

    SysUserDTO getByAccount(String account);

    Result add(SysUserSaveBO saveBO,String passwd);

    Result updatePwByOldPwAndId(String newPw,String authCode);

    Result resetPw(String newPw);

    Result<SysUserDTO> verifyLoginInfo(String account,String password,String ip);

    boolean deleteById(Long id);

    List<SysMenuVO> getUserAllMenuTreeList(Long userId);

    SysUserDTO getUserBySessionId(String sessionId);

    void resetSession(Long userId);

    boolean setUserBySessionId(SysUserDTO sysUserDTO,String sessionId);

    Result<SysUserDTO> verifyLoginInfoByMobile(String mobile,String ip);

    Result getCaptcha(String mobile);

    Result<SysUserVO> saveLoginSSO(String mobile, String captcha, String ip); //SSO登录

    Result validateToken(String token, String ip); //验证token

    Result<SysUserVO> validateCode(String code, String ip); //验证token

    void quiteSSO(String token);
}
